<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
    <div>
        <p>邓帅</p>
        <a href="http://www.mi.com">小米</a>
        <p>李东宇</p>
        <p>李文浩</p>
    </div>
</body>
<script src="jquery.3.4.1.js"></script>
<script>
    var  a = document.createElement('a')
    a.innerText = 'wahaha'
    $(a).replaceAll('p')
    $('p').replaceWith(a)
</script>
</html>